<?php
if (!isset($adm_menu)) {
	$pv = "vartotojas";
	$usr = $_SESSION['user'];
	$com = $_SESSION['company'];
} else {
	$pv = "administratorius";
	$usr = $_SESSION['auser'];
	$com = $_SESSION['acompany'];	
}
?>
<table cellspacing="0" cellpadding="0" class="innercont">
<?php
if (!isset($oldstyle) || $oldstyle != "1") {
?>
<tr><td class="ltopline"></td><td class="rtopline">&nbsp;</td></tr>
<?php
}
?>
<tr><td><img src="logo.jpg" class="logo"></td><td align="right" class="user"><div><span class="loggedin">Prisijungęs <?php echo $pv; ?> : <?php echo $usr; ?></span></div><br><?php echo $com; ?>
<?php
if (isset($adm_menu)) {
echo "<br>" . getVersionInfo();
echo "<br>" . getRobotukasInfo();
?>
<?php
}
?>
</td></tr>
<tr><td colspan="2" valign="top">
<table class="mline" cellspacing="0" cellpadding="0">
<tr height="28" class="mrow">
<?php
if (!isset($oldstyle) || $oldstyle != "1") {
?>
<td nowrap class="mitem2" width="166">&nbsp;</td>
<?php
}
if (!isset($adm_menu)) {
?>
<td  nowrap class="<?php echo isMenuSelected($_SERVER["SCRIPT_NAME"],"main.php");?>"><div class="mspan2"><A class="mlink" href="main.php">Pradžia</A></div></td>
<?php
if ($kreditas == "1") {
?>
<td  nowrap class="<?php echo isMenuSelected($_SERVER["SCRIPT_NAME"],"card");?>"><div class="mspan"><A class="mlink" href="cards.php">Kortelės</A></div></td>
<td  nowrap class="<?php echo isMenuSelected($_SERVER["SCRIPT_NAME"],"accounts.php");?>"><div class="mspan"><A class="mlink" href="accounts.php">Sąskaitos</A></div></td>
<?php
} else {
?>
<td  nowrap class="<?php echo isMenuSelected($_SERVER["SCRIPT_NAME"],"accounts.php");?>"><div class="mspan"><A class="mlink" href="accounts.php">Sąskaitos</A></div></td>
<?php
}
} else {
?>
<td  nowrap class="<?php echo isMenuSelected($_SERVER["SCRIPT_NAME"],"accounts.php");?>"><div class="mspan2"><A class="mlink" href="aaccounts.php">Sąskaitos</A></div></td>
<?php
}
if (!isset($adm_menu)) {
if (!isset($LTL) || $LTL=="0") {
?>
<td  nowrap class="<?php echo isMenuSelected($_SERVER["SCRIPT_NAME"],"payments.php");?>"><div class="mspan"><A class="mlink" href="payments.php">Finansai</A></div></td>
<?php
}
?>
<td  nowrap class="<?php echo isMenuSelected($_SERVER["SCRIPT_NAME"],"information.php");?>"><div class="mspan"><A class="mlink" href="information.php">Informacija</A></div></td>
<?php
} else {
?>
<td  nowrap class="<?php echo isMenuSelected($_SERVER["SCRIPT_NAME"],"users.php");?>"><div class="mspan"><A class="mlink" href="users.php">Vartotojai</A></div></td>
<?php
	if (isset($action_log) && $action_log == "1") {
?>
<td  nowrap class="<?php echo isMenuSelected($_SERVER["SCRIPT_NAME"],"alog.php");?>"><div class="mspan"><A class="mlink" href="alog.php">Istorija</A></div></td>
	<?php
	}
	if (isset($robotukas_log) && $robotukas_log != "") {
	?>
	<td  nowrap class="<?php echo isMenuSelected($_SERVER["SCRIPT_NAME"],"credit.php");?>"><div class="mspan"><A class="mlink" href="credit.php">Kreditas</A></div></td>
	<?php	
	}
}
?>
<?php
if (!isset($adm_menu)) {
?>
<td  nowrap class="<?php echo isMenuSelected($_SERVER["SCRIPT_NAME"],"log.php");?>"><div class="mspan"><A class="mlink" href="log.php">Istorija</A></div></td>
<td class="mlogout"><A class="mlink2" href="index.php">Atsijungti</A></td>
<?php
} else {
?>
<td class="mlogout"><A class="mlink2" href="alogout.php">Atsijungti</A></td>
<?php
}
?>
</tr>
</table>
</td></tr>
</table>